<%-- 
    Document   : onecustomer
    Created on : 12 Νοε 2011, 7:41:19 μμ
    Author     : patros
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>Show/Create Articles</title>
        </head>
        <body>
        <h:form id="customerForm" prependId="false">
            <h:messages/>
            <fieldset>
                <h:outputLabel for="status" value="Article Status(*):"/>
                <h:inputText value="#{articleBean.article.status}" id="status" required="true"/>
                <h:message for="status"/>
                <h:outputLabel for="title" value="Article Title(*):"/>
                <h:inputText value="#{articleBean.article.title}" id="title" required="true"/>
                <h:message for="title"/>
                <h:outputLabel for="date" value="Publication Date:  <%= new java.util.Date() %>" />
                <h:inputText value="#{articleBean.article.date}" id="date">
                <f:convertDateTime pattern="dd/MM/yyyy"/>
                </h:inputText>
                <h:message for="date"/>            
                <hr>
                <h:outputLabel for="articleBody" value="Body(*):"/>
                <h:inputText value="#{articleBean.article.articleBody}" id="articleBody" required="true" size="100"/>           
                <h:message for="articleBody"/>
                <hr>                  
                <h:outputLabel for="tag" value="Article Tags(*):"/>
                <h:inputText value="#{articleBean.article.tag}" id="tag" required="true"/>
                <h:message for="tag"/>
            </fieldset>
            <br>
            <h:commandButton value="Save Article" action="#{articleBean.persistArticle()}"></h:commandButton>
            <h:commandButton value="Cancel" immediate="true" action="showRegMenu"></h:commandButton>
            </body>
        </h:form>
    </html>
</f:view>
